package com.example.designpatten.chapter2_strategypatten.controller;

import com.example.designpatten.chapter2_strategypatten.strategy.CashContext;
import org.springframework.web.bind.annotation.*;

@RestController
public class StrategyContext {
    @RequestMapping(value = "/type", method = RequestMethod.GET)
    public double cash(@RequestParam(value = "type") String type) {
        CashContext context = new CashContext(type);
        return context.getResult(600);
    }
}
